Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update index.md #28207

Closed
wants to merge 1 commit into from
Closed

Update index.md #28207

wants to merge 1 commit into from

Conversation

NickSov
Copy link

@NickSov NickSov commented Jul 27, 2023

Description

Changed input.style.opacity = 0 to input.style.display = "none".

Motivation

I think this is a better solution/example because this takes the element out of the normal flow and also makes it so there isn't a clickable transparent space.

Additional details

Related issues and pull requests

I think input.style.display = "none" is a better solution/example than input.style.opacity = 0 because this takes the element out of the normal flow and also makes it so there isn't a clickable transparent space.
@NickSov NickSov requested a review from a team as a code owner July 27, 2023 00:40
@NickSov NickSov requested review from chrisdavidmills and removed request for a team July 27, 2023 00:40
@github-actions github-actions bot added the Content:HTML Hypertext Markup Language docs label Jul 27, 2023
@Josh-Cena
Copy link
Member

There's a note right below:

Note: {{cssxref("opacity")}} is used to hide the file input instead of {{cssxref("visibility", "visibility: hidden")}} or {{cssxref("display", "display: none")}}, because assistive technology interprets the latter two styles to mean the file input isn't interactive.

@Josh-Cena Josh-Cena closed this Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTML Hypertext Markup Language docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants